package org.anderground.editor.gui.properties.line;

import org.anderground.core.model.Line;
import org.anderground.editor.edits.EditsManager;
import org.anderground.editor.edits.SetLineNameAction;

public class LineNameProperty extends AbstractStringLineProperty {

	@Override
	protected String getValue(Line line) {
		return line.getName();
	}

	@Override
	protected void setValue(Line line, String cellEditorValue) {
		EditsManager.getInstance().performAction(
				new SetLineNameAction(line, cellEditorValue));
	}

	@Override
	public String getPropertyName() {
		return "Name";
	}

	@Override
	public boolean isEditable() {
		return true;
	}

}
